Skip to content

Conversation

@drivanov
Copy link
Contributor

@drivanov drivanov commented Oct 3, 2025

The test test_train previously asserted on the presence of the "Sanity Checking" message in stdout. This was brittle because in multi-GPU/DistributedDataParallel runs, only rank 0 prints this message, so tests running on other ranks failed.

This PR updates the test to:

  • Remove the fragile stdout assertion.
  • Assert trainer state (!trainer.sanity_checking, current_epoch >= 0).
  • Use LoggerCallback to verify that both training and validation ran.

This makes the test deterministic and robust across single-GPU, multi-GPU, and CI environments.

PassingLog.TXT

@codecov
Copy link

codecov bot commented Oct 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.09%. Comparing base (c211214) to head (a2a6c84).
⚠️ Report is 124 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10478      +/-   ##
==========================================
- Coverage   86.11%   85.09%   -1.02%     
==========================================
  Files         496      510      +14     
  Lines       33655    35962    +2307     
==========================================
+ Hits        28981    30601    +1620     
- Misses       4674     5361     +687     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@puririshi98 puririshi98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, @akihironitta to merge

Copy link
Contributor

@puririshi98 puririshi98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, cc @akihironitta

@puririshi98 puririshi98 enabled auto-merge (squash) October 6, 2025 18:44
auto-merge was automatically disabled October 10, 2025 17:35

Invalid email address

@puririshi98 puririshi98 merged commit 5e8f244 into pyg-team:master Oct 10, 2025
17 checks passed
ssubhanjali pushed a commit to ssubhanjali/pytorch_geometric that referenced this pull request Oct 28, 2025
… runs (pyg-team#10478)

The test `test_train` previously asserted on the presence of the "Sanity
Checking" message in stdout. This was brittle because in
multi-GPU/DistributedDataParallel runs, **only rank 0 prints this
message**, so tests running on other ranks failed.

This PR updates the test to:
- Remove the fragile stdout assertion.
- Assert trainer state (`!trainer.sanity_checking`, `current_epoch >=
0`).
- Use LoggerCallback to verify that both training and validation ran.

This makes the test deterministic and robust across single-GPU,
multi-GPU, and CI environments.


[PassingLog.TXT](https://github.com/user-attachments/files/22671419/PassingLog.TXT)

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Akihiro Nitta <[email protected]>
Co-authored-by: Rishi Puri <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants